<include file="Public/head" />
<include file="Public/common_header" />
<script src="http://img1.isou365.cn/paimai/yunying/js/global.js"></script>
<div class="mian">
    <include file="Public/sidebar" menu="clcwht.yetx"  />
    <div class="mianR">
        <h3 class="yonghu">余额提现</h3>
        <div class="yuyue">
            <ul>
                <li onclick="getList(0);" class="yuCurrent">提取中</li>
                <li onclick="getList(1);">提取成功</li>
                <li onclick="getList(2);">提取失败</li>
            </ul>
        </div>
        
        
        <div class="yuSuo clearfix" style="float:left;">
          <input type="hidden" id="t" value="{$t}"/>
          <input id="uid" name="user_id" type="text" placeholder="个人ID" value="" class="suoDian" />
          <input id="phone" name="mobile" type="text" placeholder="请输入账号" value="" class="suoDian" />
          <input id="real_name" name="real_name" type="text" placeholder="请输入姓名" value="" class="suoDian" />
          <input id="id_card" name="id_card" type="text" placeholder="请输入身份证" value="" class="suoDian" />
	 	  <input type="text" id="start_time" name="start_time" readonly="" placeholder="开始时间" style="margin-left: 10px;" />
          <em></em>
          <input type="text" id="end_time" name="end_time" readonly placeholder="结束时间"  />
          <input type="button" onclick="search();" value="搜索" class="suoSou" style="width:80px;" />
      </div>
      <div class="clear"></div>
        
        
        <div class="listBox">
      <div class="clear"></div>
            <div class="yuList">

            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<script>
var cashStatus = 0;

function getList(s,params){
	var condition = {};
	if(params){
		condition = params;
	}
	condition.status = s;
	cashStatus = s;
	
	$.post('/Cash/cashList', condition, function(data){
		$('.yuList').html(data);
	});
}
getList(0);

function get_page(page){
	var params = {};
	params.p = page;
	getList(cashStatus, params);
}



function search(){
	var params = {};
	params.user_id = $('#uid').val();
	params.mobile = $('#phone').val();
	params.real_name = $('#real_name').val();
	params.icard = $('#id_card').val();
	params.start_time = $('#start_time').val();
	params.end_time = $('#end_time').val();
	
	getList(cashStatus, params);
}

$("#start_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});
$("#end_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});



function batch_withdraw () {
    if(!confirm("确认批量提现?")){
        return false;
    }
    var ids = [];
    $("input[name='check_row']:checked").each(function () {
        ids.push($(this).val());
    });
    if(ids.length<1){
        shibai_alert("请选择一条记录");
    }
    $.post('/RedPackets/batchWithdraw',{ids:ids},function (data) {
        if(data.code!=200){
            shibai_alert(data.msg,1000);
            return false;
        }
        btn_alert('操作成功',1000,function () {
            window.location.reload();
        });
    },'json');
}


</script>
<include file="Public/foot" />